package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.SysNeedpullDataMapper;
import com.ruoyi.system.domain.SysNeedpullData;
import com.ruoyi.system.service.ISysNeedpullDataService;

/**
 * 资源同步Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-09-06
 */
@Service
public class SysNeedpullDataServiceImpl implements ISysNeedpullDataService 
{
    @Autowired
    private SysNeedpullDataMapper sysNeedpullDataMapper;

    /**
     * 查询资源同步
     * 
     * @param id 资源同步主键
     * @return 资源同步
     */
    @Override
    public SysNeedpullData selectSysNeedpullDataById(Long id)
    {
        return sysNeedpullDataMapper.selectSysNeedpullDataById(id);
    }

    /**
     * 查询资源同步列表
     * 
     * @param sysNeedpullData 资源同步
     * @return 资源同步
     */
    @Override
    public List<SysNeedpullData> selectSysNeedpullDataList(SysNeedpullData sysNeedpullData)
    {
        return sysNeedpullDataMapper.selectSysNeedpullDataList(sysNeedpullData);
    }

    /**
     * 新增资源同步
     * 
     * @param sysNeedpullData 资源同步
     * @return 结果
     */
    @Override
    public int insertSysNeedpullData(SysNeedpullData sysNeedpullData)
    {
        sysNeedpullData.setCreateTime(DateUtils.getNowDate());
        return sysNeedpullDataMapper.insertSysNeedpullData(sysNeedpullData);
    }

    /**
     * 修改资源同步
     * 
     * @param sysNeedpullData 资源同步
     * @return 结果
     */
    @Override
    public int updateSysNeedpullData(SysNeedpullData sysNeedpullData)
    {
        return sysNeedpullDataMapper.updateSysNeedpullData(sysNeedpullData);
    }

    /**
     * 批量删除资源同步
     * 
     * @param ids 需要删除的资源同步主键
     * @return 结果
     */
    @Override
    public int deleteSysNeedpullDataByIds(Long[] ids)
    {
        return sysNeedpullDataMapper.deleteSysNeedpullDataByIds(ids);
    }

    /**
     * 删除资源同步信息
     * 
     * @param id 资源同步主键
     * @return 结果
     */
    @Override
    public int deleteSysNeedpullDataById(Long id)
    {
        return sysNeedpullDataMapper.deleteSysNeedpullDataById(id);
    }

    @Override
    public List<SysNeedpullData> selectSysNeedpullDataListByCustom() {
        return sysNeedpullDataMapper.selectSysNeedpullDataListByCustom();
    }
}
